



import rangePicker from '@/components/dateRange';

export default {
  computed: {
    setCSS(identifier){
      return (identifier)=>{
        this.$nextTick(() => {
          this.$refs[`piacker${identifier}`].$el.childNodes.forEach(
            (element) => {
              if (element.childNodes.length > 0) {
                element.childNodes.forEach((item) => {
                  if (item.localName === 'input') {
                    item.setAttribute(
                      'custom-style',
                      this.$refs[`piacker${identifier}`].$attrs['custom-style']
                    )
                    Object.keys(
                      this.$refs[`piacker${identifier}`].$el.dataset
                    ).forEach((props) => {
                      item.setAttribute(`data-${props}`, '')
                    })
                  }
                })
              }
            }
          )
          return ''
        })
      }
      
    }
  },
  methods: {
    changeValue($event, obj) {
      if ($event.length == 2) {
        obj['startValue'] = $event[0];
        obj['endValue'] = $event[1];
      }
    },
  },components: {rangePicker},};
